algalcommand.io
Class Schedule

java.lang.Object
  extended by algalcommand.io.Schedule

public class Schedule
extends java.lang.Object


Field Summary
static java.lang.String[] CELL_DELIMITERS
          String that separate cells within a row, should be whitesace characters different from ROW_DELIMITERS
static java.lang.String[] COMMENT_FLAGS
          Comments start with these
static java.lang.String[] ROW_DELIMITERS
          Line terminators that signify the end of a row.
static int TIME_COLUMN
          The column parsed as time data
 
Constructor Summary
Schedule()
          Default constructor
 
Method Summary
 java.util.List<java.lang.String> getVariableTitles()
           
 int indexOf(java.lang.String variable_name)
           
 double interpolate(int variable)
          Using the time from the most recent updateTime(SimpleTime), this method interpolates the given column (see indexOf(String)) to create a value between earlier and later time points.
static void main(java.lang.String[] args)
           
 void parseFile(java.io.File f)
          Reads a file as a table of numeric data with a title row on the top
 void updateTime(SimpleTime newtime)
          Updates the internal time keeping of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROW_DELIMITERS

public static final java.lang.String[] ROW_DELIMITERS
Line terminators that signify the end of a row. Should be whitespace characters


CELL_DELIMITERS

public static final java.lang.String[] CELL_DELIMITERS
String that separate cells within a row, should be whitesace characters different from ROW_DELIMITERS


COMMENT_FLAGS

public static final java.lang.String[] COMMENT_FLAGS
Comments start with these


TIME_COLUMN

public static final int TIME_COLUMN
The column parsed as time data

See Also:
Constant Field Values
Constructor Detail

Schedule

public Schedule()
Default constructor

Method Detail

parseFile

public void parseFile(java.io.File f)
               throws java.io.FileNotFoundException,
                      java.io.IOException,
                      java.lang.NumberFormatException
Reads a file as a table of numeric data with a title row on the top

Parameters:
f -
Throws:
java.io.FileNotFoundException
java.io.IOException
java.lang.NumberFormatException

indexOf

public int indexOf(java.lang.String variable_name)
Parameters:
variable_name -
Returns:
The column index of the given variable name, or -1 if that variable name was not found.

getVariableTitles

public java.util.List<java.lang.String> getVariableTitles()

main

public static void main(java.lang.String[] args)

interpolate

public double interpolate(int variable)
Using the time from the most recent updateTime(SimpleTime), this method interpolates the given column (see indexOf(String)) to create a value between earlier and later time points. Cubic interpolation is used.

Parameters:
variable -
Returns:

updateTime

public void updateTime(SimpleTime newtime)
Updates the internal time keeping of this object. This should be called before calling interpolate(int)

Parameters:
newtime -